import React from 'react';
import {  Row , Col} from 'antd';

export default function(props:{
  dataSource:any[],
  renderItem:(item:any)=>JSX.Element
}) {
  const {
    dataSource = [],
    renderItem
  } = props
  return (
    <div>
      <Row gutter={[16, 24]}>
        {
          dataSource.map(item=>(
            <Col span={6}>
              {renderItem(item)}
            </Col>
          ))
        }
      </Row>
    </div>
  )
}